<!DOCTYPE html>
<html>
<head>
<title>基层年报-审核</title>
<div th:include="base-libs :: base-libs" />
<script th:src="@{/tbxt/js/bbsh.js}"></script>

<meta name="content-type" content="text/html; charset=UTF-8">
<style>
body {
	background: #fff;
	overflow: hidden;
	text-align: center;
}
.laydate-icon{
		    line-height: 28px;
		    background-color: #fff;
		    height: 28px;
		    border: 1px solid #B6B6B6;
		    border-radius: 5px;
		    width:84% !important;
		}
.titleTd{
			width:13%;
		}
.titleTd12{
			width:14%;
		}
.titleTd15{
			width:15%;
		}
.titleTd20{
			width:21%;
		}
.flag{
	display:none
}
.form-table{
	margin-bottom:3px;
}
</style>
</head>
<script>
	var bbshData = StoreCache.removeCache('bbshData');
	$(function() {
        $(this).registerManagerPage({cacheTables:["TB_ZY_BBZT"],callback:initData});
		initView();
	})
	/*数据查询*/
	function initData() {
		if(!$.isEmptyObject(bbshData)){
			var queryParams = {
				YLJGID : bbshData.YLJGID,
				NF : bbshData.NF
			}
			$.QuickRemote.AjaxJson(contextRoot + "wsjnb/queryNbInfo", queryNbInfoHandler, queryParams);
		}else{
			btnController();
		}
	}
	/*数据回调*/
	function queryNbInfoHandler(result) {
		$(".form-control").each(function() {
			var name = $(this).attr('name');
			$(this).val(result[name]);
		})
		initcalcu();
		//百分比计算
		bindcalcu();
		
		btnController(result.ZT);

	}
	function initView() {
        $("input").attr("disabled",'disabled');
		
		//审核不通过
		$("body").on('click','#btnShbtg',function(){
			checkPass();
		});
		
		//审核通过
		$("body").on('click','#btnShtg',function(){
			checkNoPass();
		});
		
		//返回
		$("body").on('click','#btnFh',function(){
			StoreCache.setCache('bbshTabIndex',0);
			$.QuickUrlUtils.redirectUrl("bbsh.html");
		});
		
		//审核记录
		$("body").on('click','#btnShjl',function(){
			StoreCache.setCache("BBID", bbshData.ID);
			openShjlView();
		});
	}

	function queryByNf() {
		$("#NF").val($dp.cal.newdate.y);
		initData();
	}
	/*给指定字段绑定事件*/
	function bindcalcu(){
		var keyupParamArr = [
   			//["QKYSS","CHUSHU",'CHUSHU_QKYSS'],
   			["JCYLJGS","QKYSS",'JCYLJGS_QKYSS'], //每个基层医疗机构平均拥有全科医生数=基层医疗机构数/全科医生数
   			["SQWSFWZXS","WSFWZXZYYFWS",'SQWSFWZXS_WSFWZXZYYFWS'],
   			["XZWSYS","XZWSYZYYFWS",'XZWSYS_XZWSYZYYFWS'],
   			["SQWSFWZS","WSFWZZYYFWS",'SQWSFWZS_WSFWZZYYFWS'],
   			["CWSSS","CWSSZYYFWS",'CWSSS_CWSSZYYFWS'],
   			["JCYLJGS","JCYLWSJGJSDBS",'JCYLJGS_JCYLWSJGJSDBS']
   		];
   		setKeyupFun(keyupParamArr);
        percentWfb("QKYSS","CHUSHU",'CHUSHU_QKYSS');//每万名城市居民拥有全科医生数=1000/全科医生数
	}

    /**
     *	计算百分百： csId:除数id | bcsId:被除数id | replyId:展示结果的标签id | cs:除数 | bcs:被除数
     *		注：当csId与cs（bcsId与bcs）同时存在时，以cs(bcs)为主--也就是直接指定静态的除数（被除数）
     */
    function percent(csId,bcsId,replyId,cs,bcs){
        var num1 = parseFloat(cs || $("#"+csId).val());
        var num2 = parseFloat(bcs || $("#"+bcsId).val());
        var result;
        if(num1 && num2){
            result = (num1/num2*100).toFixed(2) + "%";
        }
        $("#"+replyId).val(result).html(result);
    }



	/*计算初始化的值*/
	function initcalcu(){
		var zt = $("#ZT").val();

        var bbztArr = StoreCache.getCache("TB_ZY_BBZT");
        if(!$.isEmptyObject(bbztArr) && !$.isEmptyObject(bbztArr = bbztArr.data)){
            var bbzt = "未填报";
            $.each(bbztArr, function(i,item){
                if(item.XMDM == zt){
                    bbzt = item.XMMC;
                    return false;
                }
            })
            $("#SHZT").val(bbzt);
        }

		if (zt == '1' || zt == '3') {
			$("#south").hide();
		} else {
			$("#south").show();
		}
	    $('body').layout("resize");
	}
	
</script>
<body class="easyui-layout" border="false">
	<form id="queryForm" action="save">
		<input type="hidden" id="CHUSHU" value="10000">
		<input class="form-control" type="hidden" id="ID" name="ID" /> <input
			class="form-control" type="hidden" id="ZT" name="ZT" /> <input
			class="form-control" type="hidden" id="YLJGID" name="YLJGID" /> <input
			class="form-control" type="hidden" id="JGLB" name="JGLB" /> <input
			class="form-control" type="hidden" id="XZQH" name="XZQH" />
		<div region="north" style="height:60px;border:0;border-bottom:1px solid #ddd">
		<table class="form-table" >
			<tr>
				<td class="td-text">审核状态：</td>
				<td class="td-content">
					<input id="SHZT" name="SHZT" class="form-control dataField" readonly="readonly">
				</td>
				<td class="td-text">机构名称：</td>
				<td class="td-content">
					<input id="JGMC" name="JGMC" class="form-control dataField" readOnly="readOnly">
				</td>
				<td class="td-text"><label>年份：</label></td>
				<td class="td-content">
					<input type="text" id="NF" name="NF" class="form-control laydate-icon" 
					onfocus="WdatePicker({dateFmt:'yyyy',readOnly:true,onpicking:queryByNf})"
					quick-config="label:'年份', validateProxy:'notNull length', length: '10'" />
				</td>
				<td>
					<button id="btnShjl" class="btn btn-info" type="button">审核记录</button>
				</td>
			</tr>
		</table>
		</div>
		<div region="center" border="false" style="overflow-x:hidden;">
		<div class="easyui-panel" title="一、人员基础情况" style="width:99.9%;overflow-x:hidden;border-bottom:0;">
			<table class="form-table">
				<tr>
					<td class="td-text titleTd12">1.基础人口情况：</td>
					<td class="td-text titleTd"><label>辖区户籍人口数：</label></td>
					<td class="td-content">
						<input id="XQHJRKS" name="XQHJRKS" class="form-control dataField" type="text"
							   quick-config="label:'辖区户籍人口数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd"><label>辖区家庭户数：</label></td>
					<td class="td-content">
						<input id="XQJTHS" name="XQJTHS" class="form-control"
							   quick-config="label:'辖区家庭户数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd"><label>其中，普通人群数：</label></td>
					<td class="td-content">
						<input id="PTRQS" name="PTRQS" class="form-control dataField"
							   quick-config="label:'普通人群数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd"><label>重点人群数：</label></td>
					<td class="td-content">
						<input id="ZDRQS" name="ZDRQS" class="form-control"
							   quick-config="label:'重点人群数', validateProxy:'notNull length num', length: '10'" />
					</td>
				</tr>
				<tr>
					<td class="td-text titleTd12" rowspan="2">2.各类重点人群情况：</td>
					<td class="td-text titleTd"><label>65岁以上老年人数：</label></td>
					<td class="td-content">
						<input id="LNRRS" name="LNRRS" class="form-control dataField"
						quick-config="label:'65岁以上老年人数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd"><label>慢病人群数：</label></td>
					<td class="td-content">
						<input id="MBRQS" name="MBRQS" class="form-control"
						quick-config="label:'慢病人群数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd"><label>高血压人群数：</label></td>
					<td class="td-content">
						<input id="GXYRQS" name="GXYRQS" class="form-control dataField"
						quick-config="label:'高血压人群数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd"><label>糖尿病人群数：</label></td>
					<td class="td-content">
						<input id="TNBRQS" name="TNBRQS" class="form-control"
						quick-config="label:'糖尿病人群数', validateProxy:'notNull length num', length: '10'" />
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>孕产妇人群数：</label></td>
					<td class="td-content">
						<input id="YCFRQS" name="YCFRQS" class="form-control dataField"
						quick-config="label:'孕产妇人群数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text mytext"><label>0~6岁儿童数：</label></td>
					<td class="td-content ">
						<input id="ETS" name="ETS" class="form-control"
						quick-config="label:'0~6岁儿童数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text"><label>残疾人数：</label></td>
					<td class="td-content">
						<input id="CJRS" name="CJRS" class="form-control dataField" type="text"
						quick-config="label:'残疾人数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text"><label>精神病患者数：</label></td>
					<td class="td-content">
						<input id="JSBHZS" name="JSBHZS" class="form-control"
						quick-config="label:'精神病患者数', validateProxy:'notNull length num', length: '10'" />
					</td>
				</tr>
			</table>
		</div>
		<div class="easyui-panel" title="二、医护人员情况" style="width:99.9%;overflow-x:hidden;border-bottom:0;">
			<table class="form-table" >
				<tr>
					<td class="td-text titleTd20"><label>1.医生总数：</label></td>
					<td class="td-content">
						<input id="YSZS" name="YSZS" class="form-control dataField" type="text"
						quick-config="label:'医生总数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd20"><label>多点执业医师数：</label></td>
					<td class="td-content">
						<input id="DDZYYSS" name="DDZYYSS" class="form-control dataField" type="text"
						quick-config="label:'多点执业医师数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd20"><label>护士总数：</label></td>
					<td class="td-content">
						<input id="HSZS" name="HSZS" class="form-control"
						quick-config="label:'护士总数', validateProxy:'notNull length num', length: '10'" />
					</td>
				</tr>
				<tr>
					<td class="td-text "><label>2.全科医生数：</label></td>
					<td class="td-content">
						<input id="QKYSS" name="QKYSS" class="form-control dataField" type="text"
						quick-config="label:'全科医生数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text "><label>每万名城市居民拥有全科医生数：</label></td>
					<td class="td-content">
						<input id="CHUSHU_QKYSS" class="form-control dataField CHUSHU-QKYSS" type="text" readonly="readonly"/>
					</td>
					<td class="td-text "><label>每个基层医疗机构平均拥有全科医生数：</label></td>
					<td class="td-content ">
						<input id="JCYLJGS_QKYSS" class="form-control JCYLJGS-QKYSS" type="text" readonly="readonly"/>
					</td>
				</tr>
			</table>
		</div>
		<div class="easyui-panel" title="三、医疗资源情况" style="width:99.9%;overflow-x:hidden;border-bottom:0;">
			<table class="form-table" >

			</table>
			<table class="form-table" style="margin-top:-1px;">
				<tr>
					<td class="td-text "><label>1.医疗机构总数：</label></td>
					<td class="td-content">
						<input id="YLJGZS" name="YLJGZS" class="form-control dataField"
							   quick-config="label:'医疗机构总数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text "><label>其中，三级医疗机构数：</label></td>
					<td class="td-content">
						<input id="SJYLJGS" name="SJYLJGS" class="form-control dataField" type="text"
							   quick-config="label:'三级医疗机构数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text "><label>二级医疗机构数：</label></td>
					<td class="td-content">
						<input id="EJYLJGS" name="EJYLJGS" class="form-control"
							   quick-config="label:'二级医疗机构数', validateProxy:'notNull length num', length: '10'" />
					</td>

				</tr>
				<tr>
					<td class="td-text titleTd20"><label>2.社区卫生服务中心数：</label></td>
					<td class="td-content">
						<input id="SQWSFWZXS" name="SQWSFWZXS" class="form-control dataField" type="text"
						quick-config="label:'社区卫生服务中心数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd20"><label>其中，提 供中医药服务数：</label></td>
					<td class="td-content">
						<input id="WSFWZXZYYFWS" name="WSFWZXZYYFWS" class="form-control dataField" 
						quick-config="label:'提 供中医药服务数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd20"><label>提供中医药服务机构占比：</label></td>
					<td class="td-content">
						<input id="SQWSFWZXS_WSFWZXZYYFWS" readonly="readonly" class="form-control SQWSFWZXS-WSFWZXZYYFWS" type="text" />
					</td>
				</tr>

				<tr>
					<td class="td-text"><label>3.乡镇卫生院数：</label></td>
					<td class="td-content">
						<input id="XZWSYS" name="XZWSYS" class="form-control dataField" 
						quick-config="label:'乡镇卫生院数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text"><label>其中，提供 中医药服务数：</label></td>
					<td class="td-content">
						<input id="XZWSYZYYFWS" name="XZWSYZYYFWS" class="form-control dataField" 
						quick-config="label:'提供 中医药服务数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text"><label>提供中医药服务机构占比：</label></td>
					<td class="td-content">
						<input id="XZWSYS_XZWSYZYYFWS" readonly="readonly" class="form-control dataField XZWSYS-XZWSYZYYFWS" />
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>4.社区卫生服务站数：</label></td>
					<td class="td-content">
						<input id="SQWSFWZS" name="SQWSFWZS" class="form-control dataField" 
						quick-config="label:'社区卫生服务站数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text"><label>其中，提供中 医药服务数：</label></td>
					<td class="td-content">
						<input id="WSFWZZYYFWS" name="WSFWZZYYFWS" class="form-control dataField" 
						quick-config="label:'提供中 医药服务数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text"><label>提供中医药服务机构占比：</label></td>
					<td class="td-content">
						<input id="SQWSFWZS_WSFWZZYYFWS" readonly="readonly" class="form-control dataField SQWSFWZS-WSFWZZYYFWS" />
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>5.村卫生室数：</label></td>
					<td class="td-content">
						<input id="CWSSS" name="CWSSS" class="form-control dataField" type="text"
						quick-config="label:'村卫生室数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text"><label>其中，提供中医 药服务数：</label></td>
					<td class="td-content">
						<input id="CWSSZYYFWS" name="CWSSZYYFWS" class="form-control dataField" 
						quick-config="label:'提供中医 药服务数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text"><label>提供中医药服务机构占比：</label></td>
					<td class="td-content">
						<input id="CWSSS_CWSSZYYFWS" readonly="readonly" class="form-control dataField CWSSS-CWSSZYYFWS"  />
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>6.基层医疗卫生机构建设达标数：</label></td>
					<td class="td-content">
						<input id="JCYLWSJGJSDBS" name="JCYLWSJGJSDBS" class="form-control" 
						quick-config="label:'基层医疗卫生机构建设达标数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text"><label>基层医疗机构数：</label></td>
					<td class="td-content">
						<input id="JCYLJGS" name="JCYLJGS" class="form-control"
							   quick-config="label:'基层医疗机构数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text"><label>基层医疗卫生机构建设达标率：</label></td>
					<td class="td-content">
						<input id="JCYLJGS_JCYLWSJGJSDBS" readonly="readonly" class="form-control dataField JCYLJGS-JCYLWSJGJSDBS" type="text" />
					</td>
				</tr>
			</table>
		</div>
		<div class="easyui-panel" title="四、独立设置医疗机构情况" style="width:99.9%;overflow-x:hidden;border-bottom:0;">
			<table class="form-table" >
				<tr>
					<td class="td-text titleTd20"><label>1.医学影像诊断中心数：</label></td>
					<td class="td-content">
						<input id="YXYXZDZXS" name="YXYXZDZXS" class="form-control dataField" 
						quick-config="label:'医学影像诊断中心数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd20"><label>2.医学检验实验室数：</label></td>
					<td class="td-content">
						<input id="YXJYSYSS" name="YXJYSYSS" class="form-control dataField" type="text"
						quick-config="label:'医学检验实验室数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd20"><label>3.病理诊断中心数：</label></td>
					<td class="td-content">
						<input id="BLZDZXS" name="BLZDZXS" class="form-control dataField" type="text"
						quick-config="label:'病理诊断中心数', validateProxy:'notNull length num', length: '10'" />
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>4.血液透析中心数：</label></td>
					<td class="td-content">
						<input id="XYTXZXS" name="XYTXZXS" class="form-control dataField" 
						quick-config="label:'血液透析中心数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text"><label>5.消毒供应中心数：</label></td>
					<td class="td-content">
						<input id="XDGYZXS" name="XDGYZXS" class="form-control dataField" 
						quick-config="label:'消毒供应中心数', validateProxy:'notNull length num', length: '10'" />
					</td>
				</tr>
			</table>
		</div>
		<div class="easyui-panel" title="五、医联体情况" style="width:99.9%;overflow-x:hidden;border-bottom:0;">
			<table class="form-table " >
				<tr>
				<td class="td-text titleTd"><label>1.医联体数：</label></td>
				<td class="td-content">
					<input id="YLTS" name="YLTS" class="form-control dataField" 
					quick-config="label:'医联体数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text titleTd12"><label>其中，医疗联合体数：</label></td>
				<td class="td-content">
					<input id="YLLHTS" name="YLLHTS" class="form-control dataField" 
					quick-config="label:'医疗联合体数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text titleTd"><label>医疗共同体数：</label></td>
				<td class="td-content">
					<input id="YLGTTS" name="YLGTTS" class="form-control dataField" type="text"
					quick-config="label:'医疗共同体数：', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text titleTd"><label>专科联盟数：</label></td>
				<td class="td-content">
					<input id="ZKLMS" name="ZKLMS" class="form-control dataField" type="text"
					quick-config="label:'专科联盟数：', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text titleTd"><label>远程医疗数：</label></td>
				<td class="td-content">
					<input id="YCYLS" name="YCYLS" class="form-control dataField" 
					quick-config="label:'远程医疗数：', validateProxy:'notNull length num', length: '10'" />
				</td>
				</tr>
				<tr>
					<td class="td-text titleTd12" ><label>2.加入医联体机构数：</label></td>
					<td class="td-content">
						<input id="JRYLTJGS" name="JRYLTJGS" class="form-control dataField"
							   quick-config="label:'加入医联体机构数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd12"><label>其中，三级机构数：</label></td>
					<td class="td-content">
						<input id="SJJGS" name="SJJGS" class="form-control dataField"
							   quick-config="label:'三级机构数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd12"><label>二级机构数：</label></td>
					<td class="td-content">
						<input id="EJJGS" name="EJJGS" class="form-control dataField" type="text"
							   quick-config="label:'二级机构数', validateProxy:'notNull length num', length: '10'" />
					</td>
					<td class="td-text titleTd12"><label>基层机构数：</label></td>
					<td class="td-content">
						<input id="JCJGS" name="JCJGS" class="form-control dataField" type="text"
							   quick-config="label:'基层机构数', validateProxy:'notNull length num', length: '10'" />
					</td>
				</tr>
			</table>
		</div>
		</div>
	</form>
	<div region="south" id="south" style="height:45px;line-height:40px;text-align:center;border:0;border-top:1px solid #ddd">
	</div>

</body>
<script type="text/html" id="shBtnBox">
	<button id="btnShbtg" class="btn btn-info" type="button">审核不通过</button>
	<button id="btnShtg" class="btn btn-info" type="button">审核通过</button>
	<button id="btnFh" class="btn btn-info" type="button">返回</button>
</script>
</html>
